package com.jspgou.cms.entity.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the jc_noctice table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="jc_noctice"
 */

public abstract class BaseNoctice  implements Serializable {

	public static String REF = "Noctice";
	public static String PROP_USER = "user";
	public static String PROP_NOCTICE_TIME = "nocticeTime";
	public static String PROP_PRODUCT = "product";
	public static String PROP_STATUE = "statue";
	public static String PROP_REGISTER_TIME = "registerTime";
	public static String PROP_ID = "id";


	// constructors
	public BaseNoctice () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseNoctice (java.lang.Integer id) {
		this.setId(id);
		initialize();
	}

	/**
	 * Constructor for required fields
	 */
	public BaseNoctice (
		java.lang.Integer id,
		com.jspgou.core.entity.User user,
		com.jspgou.cms.entity.Product product,
		java.util.Date registerTime) {

		this.setId(id);
		this.setUser(user);
		this.setProduct(product);
		this.setRegisterTime(registerTime);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.Integer id;

	// fields
	private java.util.Date registerTime;
	private java.util.Date nocticeTime;
	private boolean statue;

	// many to one
	private com.jspgou.core.entity.User user;
	private com.jspgou.cms.entity.Product product;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="identity"
     *  column="Id"
     */
	public java.lang.Integer getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.Integer id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: register_time
	 */
	public java.util.Date getRegisterTime () {
		return registerTime;
	}

	/**
	 * Set the value related to the column: register_time
	 * @param registerTime the register_time value
	 */
	public void setRegisterTime (java.util.Date registerTime) {
		this.registerTime = registerTime;
	}


	/**
	 * Return the value associated with the column: noctice_time
	 */
	public java.util.Date getNocticeTime () {
		return nocticeTime;
	}

	/**
	 * Set the value related to the column: noctice_time
	 * @param nocticeTime the noctice_time value
	 */
	public void setNocticeTime (java.util.Date nocticeTime) {
		this.nocticeTime = nocticeTime;
	}


	/**
	 * Return the value associated with the column: statue
	 */
	public boolean isStatue () {
		return statue;
	}

	/**
	 * Set the value related to the column: statue
	 * @param statue the statue value
	 */
	public void setStatue (boolean statue) {
		this.statue = statue;
	}


	/**
	 * Return the value associated with the column: email
	 */
	public com.jspgou.core.entity.User getUser () {
		return user;
	}

	/**
	 * Set the value related to the column: email
	 * @param user the email value
	 */
	public void setUser (com.jspgou.core.entity.User user) {
		this.user = user;
	}


	/**
	 * Return the value associated with the column: name
	 */
	public com.jspgou.cms.entity.Product getProduct () {
		return product;
	}

	/**
	 * Set the value related to the column: name
	 * @param product the name value
	 */
	public void setProduct (com.jspgou.cms.entity.Product product) {
		this.product = product;
	}



	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.jspgou.cms.entity.Noctice)) return false;
		else {
			com.jspgou.cms.entity.Noctice noctice = (com.jspgou.cms.entity.Noctice) obj;
			if (null == this.getId() || null == noctice.getId()) return false;
			else return (this.getId().equals(noctice.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}